package com.vencent.spring.xml.aop;

import org.aspectj.lang.ProceedingJoinPoint;

public class TimeCounter {
	public void timeCounter(ProceedingJoinPoint join, Long time){
		try {
			long begin = System.currentTimeMillis();
			join.proceed();
			long end   = System.currentTimeMillis();
			long s = end - begin;
			System.out.println("方法运行的时间： " + s + "比原来的快: " + (s - time) + "单位(ms)");
		} catch (Throwable e) {
			System.out.println("失败了" + e.getMessage());
		}
	}
}
